import request from '../utils/request.js'
//登录

export function login(data) {
    return request.post('/admin/login', data)
}
//商品分类数据列表
export function getCategoryList() {
    return request.get('/admin/categoryList')
}
//添加分类
export function addCategory(data) {
    return request.post('/admin/categorie/add', data)
}
//商品数据列表
export function goodsList() {
    return request.get('/admin/product/list')
}
//删除
export function delGoods(params) {
    return request.post('/admin/product/delete', params)
}
//根据id查
export function findGoods(id) {
    return request.get(`/admin/product?id=${id}`)
}

export function updateGoods(data) {
    return request.post('/admin/product/update', data)
}
export function addGoods(data) {
    return request.post('/admin/product/add', data)
}